<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/index.xhtml">
        <ui:define name="title"/>   
        <ui:define name="body">

            <h:form>
                <p:panel id="panel" header="#{bundle.EditTblCuotaTitle}" style="margin-bottom:5px;">
                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                    </h:panelGroup>

                    <h:panelGrid columns="3" cellpadding="3">
                        <p:outputLabel value="#{bundle.EditTblCuotaLabel_idCuota}" for="idCuota" />
                        <br/>
                        <h:outputLabel value="#{bundle.EditTblCuotaLabel_fecha}" for="fecha" />
                        <p:calendar id="fecha" value="#{tblCuotaController.selected.fecha}" title="#{bundle.EditTblCuotaTitle_fecha}" required="true" requiredMessage="#{bundle.EditTblCuotaRequiredMessage_fecha}" effect="fold" pattern="dd-MM-yyyy">
                            <f:validateLength minimum="2" />
                        </p:calendar>
                        <p:message for="fecha" />

                        <p:outputLabel value="#{bundle.EditTblCuotaLabel_valor}" for="valor" />
                        <p:inputText id="valor" value="#{tblCuotaController.selected.valor}" title="#{bundle.EditTblCuotaTitle_valor}" required="true" requiredMessage="#{bundle.EditTblCuotaRequiredMessage_valor}">
                            <f:validateLength minimum="2" />
                        </p:inputText>
                        <p:message for="valor" />

                        <h:outputLabel value="#{bundle.EditTblCuotaLabel_tblNatilleraPersona}" for="tblNatilleraPersona" />
                        <p:selectOneMenu id="tblNatilleraPersona" value="#{tblCuotaController.selected.tblNatilleraPersona}" required="true" requiredMessage="#{bundle.EditTblCuotaRequiredMessage_tblNatilleraPersona}">
                            <h:selectOneMenu title="#{bundle.EditTblCuotaTitle_tblNatilleraPersona}"/>
                            <f:selectItems value="#{tblNatilleraPersonaController.itemsAvailableSelectOne}"/>
                            <f:validateLength minimum="2" />
                        </p:selectOneMenu>
                        <p:message for="tblNatilleraPersona" />

                        <h:outputLabel value="#{bundle.EditTblCuotaLabel_concepto}" for="concepto" />
                        <p:selectOneMenu id="concepto" value="#{tblCuotaController.selected.concepto}" required="true" requiredMessage="#{bundle.EditTblCuotaRequiredMessage_concepto}">
                            <h:selectOneMenu title="#{bundle.EditTblCuotaTitle_concepto}"/>
                            <f:selectItems value="#{tblConceptoController.itemsAvailableSelectOne}"/>
                            <f:validateLength minimum="2" />
                        </p:selectOneMenu>
                        <p:message for="concepto" />

                    </h:panelGrid>

                    <p:commandButton action="#{tblCuotaController.update}" value="#{bundle.EditTblCuotaSaveLink}" update="panel"/>
                    <p:commandButton action="#{tblCuotaController.prepareList}" value="#{bundle.EditTblCuotaShowAllLink}" immediate="true"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
